package com.lfs.market.exception;


import com.lfs.market.model.enums.ResultCode;
import lombok.Data;


@Data
public class ServiceException extends RuntimeException {
    ResultCode resultCode;

    public ServiceException(ResultCode resultCode) {
        super(resultCode.getName());
        this.resultCode = resultCode;
    }

    public ServiceException(ResultCode resultCode, String msg) {
        super(msg);
        resultCode.setName(msg);
        this.resultCode = resultCode;

    }
}
